package vashion.azeroth.core.api.rest;

import org.jboss.resteasy.client.ClientRequest;
import org.jboss.resteasy.client.ClientResponse;

public class HttpRestRequest {

	public static String exec(String json) {

		System.out.println("-----start------");

		try {

			ClientRequest request = new ClientRequest(
					vashion.azeroth.contant.ErpConstant.url);

			request.body("application/json", json);

			ClientResponse response = request.post(String.class);

			String responseContent = (String) response.getEntity();

			return responseContent;

		} catch (Exception e) {

			e.printStackTrace();

			return null;
		}

	}

}
